package service

import (
	"github.com/emicklei/go-restful"
	"github.com/jackc/pgx"
	"gitlab.com/adapt-karaoke-project/backend/service/object"
	"github.com/jinzhu/gorm"
	"gitlab.com/adapt-karaoke-project/backend/service/crud"
	"gitlab.com/adapt-karaoke-project/backend/config"
)

type Service interface {
	Register(container *restful.Container)
	Init(config config.InitConfig)
}

func NewServices(pool *pgx.ConnPool, db *gorm.DB) []Service {
	return []Service{
		object.NewObjectService(pool, db),
		crud.NewCrudService(pool, db),
	}
}
